package com.ndp.fb.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by Sisi on 15-3-4.
 */
@Setter
@Getter
@NoArgsConstructor
public class AdSetStats extends AdStats implements Serializable {
    /**
     * 描述   (@author: giser.yang)
     */

    private static final long serialVersionUID = -7052301990583290624L;
    /**  描述   (@author: giser.yang) */      
    public Date dataUpdateTime;
    /**
     * campaignId
     */
    private Long campaignId;
    /**
     * campaignGroupId
     */
    private Long campaignGroupId;
    private Date updateTime;
    /**
     * 查询日期
     */
    private String day;
    /**
     * 用来分片用的id
     */
    private String mongodbId;

    /**
     * 本次拉取数据开始时间
     */
    private Long processStartTime;
    /**
     * 本次拉取数据结束时间
     */
    private Long processEndTime;

    private String campaignGroupName;
    private String adSetName;
    private Long startTime;
    private Long endTime;
    private Long fbConnectionObjectId;
    private String fbConnectionObjectName;
    private Double price;
    private Long productConfId;
    private String campaignStatus;
    private String adSetEffectiveStatus;
    private String platform;
    private Long publishBatchId;
    private String bidType;
    private Object bidInfo;
    private Object promotedObject;
    private Object targeting;

    /**
     * dailyBudget
     */
    private Integer dailyBudget;

    /**
     * lifetimeBudget
     */
    private Integer lifetimeBudget;

    public void init() {
        this.setClicks(0);
        this.setImpressions(0);
        this.setPrice(0.0);
        this.setResults(0);
        this.setSocialClicks(0);
        this.setSocialImpressions(0);
        this.setSocialSpent(0);
        this.setSocialUniqueClicks(0);
        this.setSocialUniqueImpressions(0);
        this.setSpent(0);
        this.setUniqueClicks(0);
        this.setUniqueImpressions(0);
        this.setCost(0.0);
        this.setProcessStartTime(System.currentTimeMillis());
    }

}
